package qs.openxt.libs.qrcode;

import android.os.AsyncTask;

public class QrcodeLoadingTask extends AsyncTask<String, Integer, String> {
	private QrcodeLoading callBack = null;

	public QrcodeLoadingTask(QrcodeLoading callBack) {
		this.callBack = callBack;
	}

	public boolean cancelTask() {
		if (cancel(true)) {
			this.callBack = null;
			return true;
		}
		return false;
	}

	protected String doInBackground(String... params) {
		try {
			Thread.sleep(500);
		} catch (Exception e0) {
		}
		return null;
	}

	protected void onPostExecute(String result) {
		super.onPostExecute(result);
		this.callBack.onSuccess();
	}
}